<!DOCTYPE html>
<html>
  <head lang="en">
    <meta charset="UTF-8" />
    <title>Test to use plugin in node environment</title>
  </head>
  <body>
    <div id="editor"></div>
    <!-- Editor -->
    <script type="module">
      import { Editor } from 'http://localhost:8080/dist/index.js';
      import mergedTableCellPlugin from '/dist/index.js';

      const content = [
        '| @cols=2:mergedHead1 | @cols=3:mergedHead2 |',
        '| --- | --- | --- | --- | --- |',
        '| @cols=2:mergedCell1-1 | cell1-2 | @cols=2:@rows=5:mergedCell1-3 |',
        '| @rows=2:mergedCell2-1 | @rows=2:mergedCell2-2 | cell2-3 | cell2-4 | cell2-5 | cell2-6 |',
        '| cell3-1 |',
        '| cell4-1 | cell4 | cell4-3 |',
        '| cell5-1 | cell5-2 | cell5-3 | cell5-4 |',
        '',
      ].join('\n');
      
      const editor = new Editor({
        el: document.querySelector('#editor'),
        previewStyle: 'vertical',
        height: '500px',
        initialEditType: 'wysiwyg',
        initialValue: content,
        plugins: [mergedTableCellPlugin],
      });

      window.editor = editor;
    </script>
  </body>
</html>

